//
//  UIImage+DataString.m
//  FbeeAPP
//
//  Created by dev-m on 2018/3/12.
//  Copyright © 2018年 mohao. All rights reserved.
//

#import "UIImage+DataString.h"

@implementation UIImage(DataString)

+(UIImage *)imgWithDataStringArray:(NSArray *)strings
{
    NSUInteger c = strings.count;
    uint8_t *bytes = malloc(sizeof(*bytes) * c);
    for (NSUInteger i = 0; i < c; i++)
    {
        NSString *str = [strings objectAtIndex:i];
        int byte = [str intValue];
        bytes[i] = byte;
    }
    NSData *imgData = [[NSData alloc] initWithBytes:bytes length:c];
   return [UIImage imageWithData:imgData];
}

@end
